package com.sc.nft.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.DigitalCollection;
import com.sc.nft.entity.vo.EcologyPoolRedPackReceiveVO;
import com.sc.nft.entity.vo.ecologypool.*;
import com.sc.nft.enums.ecologypool.EcologyPoolRedPackAuditStatusEnum;
import com.sc.nft.enums.ecologypool.EcologyPoolRedPackMechanismEnum;
import com.sc.nft.enums.ecologypool.EcologyPoolRedPackTypeEnum;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


public interface EcologyPoolRedPackService {


    /**
     * 红包数量巡检
     */
    void redPackOnSiteInspection();

    /**
     * 红包活动结束归还积分
     */
    void redPackExpiredPointsRefund();

    /**
     * app红包详情
     *
     * @param userId userId
     * @param id     红包id
     * @return WebEcologyPoolRedPackDetailVO
     */
    WebEcologyPoolRedPackDetailVO redPackDetail(Long userId, Long id);

    /**
     * app红包活动列表
     *
     * @param daoId   daoId
     * @param pageNo  pageNo
     * @param pageNum pageNum
     * @return WebEcologyPoolRedPackPageVO
     */
    IPage<WebEcologyPoolRedPackPageVO> redPackPage(Long daoId, Integer pageNo, Integer pageNum);

    /**
     * app红包活动参与记录
     *
     * @param userId  userId
     * @param daoId   daoId
     * @param pageNo  pageNo
     * @param pageNum pageNum
     * @return WebEcologyPoolParticipatePageVO
     */
    IPage<WebEcologyPoolParticipatePageVO> redPackParticipatePage(Long userId, Long daoId, Integer pageNo, Integer pageNum);

    /**
     * app红包开启状态
     *
     * @param daoId daoId
     * @return WebEcologyPoolRedPackStatusVO
     */
    WebEcologyPoolRedPackStatusVO redPackStatus(Long daoId);

    /**
     * app打开红包
     *
     * @param userId userId
     * @param id     红包id
     */
    WebEcologyPoolRedPackOpenVO openRedPack(Long userId, Long id);


    /**
     * 奖励类型列表
     * @return EcologyPoolDaoCommunityServiceRankIncomePrizeVo
     */
    List<EcologyPoolDaoCommunityServiceRankIncomePrizeVo> daoCommunityServiceRankIncomePrizes();

    /**
     * 商户/admin 红包列表
     *
     * @param daoId       daoId
     * @param pageNo      pageNo
     * @param pageNum     pageNum
     * @param name        name
     * @param auditStatus auditStatus
     * @return EcologyPoolRedPackPageVO
     */
    IPage<EcologyPoolRedPackPageVO> daoRedPackPage(Long daoId, Integer pageNo, Integer pageNum, String name, EcologyPoolRedPackAuditStatusEnum auditStatus);

    /**
     * 创建红包
     *
     * @param daoId             daoId
     * @param name              name
     * @param mechanism         mechanism
     * @param type              type
     * @param rewardNumber      rewardNumber
     * @param packNumber        packNumber
     * @param startTime         startTime
     * @param endTime           endTime
     * @param activeRule        activeRule
     * @param participateType   participateType
     * @param participateNft    participateNft
     * @param participateNumber participateNumber
     */
    void createRedPackPage(Long daoId, String name, EcologyPoolRedPackMechanismEnum mechanism, EcologyPoolRedPackTypeEnum type, BigDecimal rewardNumber, Long packNumber, Date startTime, Date endTime, String activeRule, Boolean participateType, List<Long> participateNft, Integer participateNumber);

    /**
     * 红包详情
     *
     * @param id id
     * @return EcologyPoolRedPackDetailVO
     */
    EcologyPoolRedPackDetailVO redPackPageDetail(Long id);

    /**
     * 数据详情-红包领取记录
     *
     * @param pageNo   pageNo
     * @param pageSize pageSize
     * @param id       红包活动id
     * @param userTel  userTel
     * @return EcologyPoolRedPackReceiveVO
     */
    IPage<EcologyPoolRedPackReceiveVO> redPackDataPage(Integer pageNo, Integer pageSize, Long id, String userTel);

    /**
     * 数据详情-红包数据
     *
     * @param id 红包id
     * @return EcologyPoolRedPackDataDetailVO
     */
    EcologyPoolRedPackDataDetailVO redPackDataDetail(Long id);

    /**
     * 红包开启关闭
     *
     * @param id   id
     * @param open open
     */
    void redPackOpen(Long id, Boolean open);

    /**
     * 删除红包
     *
     * @param id id
     */
    void removeRedPack(Long id);

    /**
     * 红包审核
     *
     * @param id              id
     * @param auditStatusEnum auditStatusEnum
     * @param rejectReason    rejectReason
     */
    void auditRedPack(Long id, EcologyPoolRedPackAuditStatusEnum auditStatusEnum, String rejectReason);

    /**
     * 获取dao下的藏品
     *
     * @param daoId daoId
     * @return DigitalCollection
     */
    List<EcologyPoolRedPackCollectionVO> listDaoDigitalCollection(Long daoId);
}
